import { Routes } from '@angular/router';
import {NoTask} from './tasks/no-task/no-task';
import {
  resolveUserName,
  UserTasks
} from './users/user-tasks/user-tasks';
import {NotFound} from './not-found/not-found';
import { routes as userRoutes } from '../app/users/users.routes';

export const routes: Routes = [
  {
    path:'', // <your-domain>
    component:NoTask,
    title:'No task selected'
  },
  {
    path:'users/:userId', // <your-domain>/users/xxx
    component:UserTasks,
    children:userRoutes,
    data:{
      message:'Hello!'
    },
    resolve:{
      userName:resolveUserName
    }
  },
  {
    path:'**',
    component:NotFound
  }

];
